const common = {
	upload: function(files, params) {
		return uni.$func.upload('/api/attachment/upload', params);
	},
	login: function(params) {
		return uni.$u.post("/api/oauth/user/token?userName=" + params.userName + "&password=" + params.password,
			params,{
				'Content-Type': 'application/json'
			});
	},
	userscurrent: function(params) {
		return uni.$u.get("/api/users/current");
	},

	workoutList: function(params) {
		return uni.$u.get(`/api/workout`,params);
	},
	studentworkList: function(params) {
		return uni.$u.get(`/api/studentwork`,params);
	},
	deleteoutkList: function(id) {
		return uni.$u.delete(`/api/workout/${id}`);
	},
	workoutadss: function(id,openTime) {
		return uni.$u.get(`/api/workout/${id}?openTime=` + openTime);
	},
	editHours: function(params) {
		return uni.$u.post(`/api/workout/editclassHours`,params);
	},
	userslist: function(params) {
		return uni.$u.post(`/api/users/list`,params);
	},

	endworkout: function(params) {
		return uni.$u.post(`/api/workout/update`,params);
	},
	accessoryupload: function(params) {
		return uni.$u.post(`/api/accessory/upload`,params);
	},
	
	updatecommentworkout: function(params) {
		return uni.$u.post(`/api/workout/updatecomment`,params);
	},

	studentinfolistapp: function(params) {
		return uni.$u.get(`/api/studentinfo/listapp`,params);
	},
	deletestudentinfo: function(id) {
		return uni.$u.delete(`/api/studentinfo/${id}`);
	},
	studentinfoDetail: function(id) {
		return uni.$u.get(`/api/studentinfo/${id}`);
	},
	listNotPage: function(id) {
		return uni.$u.get(`/api/campusinfo/listNotPage?keyword=`);
	},
	addstudentinfo: function(params) {
		return uni.$u.post(`/api/studentinfo`,params);
	},
	studentworkRecord: function(params) {
		return uni.$u.get(`/api/studentwork/studentRecord/${params.id}`,params);
	},
	studentworkDetail: function(id) {
		return uni.$u.get(`/api/studentwork/${id}`);
	},
	studentleaveaddLeave: function(params) {
		return uni.$u.post(`/api/studentleave/addLeave`,params);
	},
	studentleavedelLeave: function(params) {
		return uni.$u.post(`/api/studentleave/delLeave`,params);
	},

	
	studentworkreportList: function(params) {
		return uni.$u.get(`/api/studentwork/reportList`,params);
	},
	studentaskList: function(params) {
		return uni.$u.get(`/api/studentask`,params);
	},

	studentaskDetail: function(id) {
		return uni.$u.get(`/api/studentask/${id}`);
	},
	studentaskaddConent: function(params) {
		return uni.$u.post(`/api/studentask/addConent`,params);
	},
	studentaskeditAsk: function(params) {
		return uni.$u.post(`/api/studentask/editAsk`,params);
	},

	msginfoList: function(params) {
		return uni.$u.get(`/api/msginfo`,params);
	},
	msginfoeditRead: function(params) {
		return uni.$u.post(`/api/msginfo/editRead`,params);
	},

	userseditInfo: function(params) {
		return uni.$u.post(`/api/users/editInfo`,params);
	},
	workoutDetail: function(params) {
		return uni.$u.get(`/api/workout/${params.id}?openTime=`+params.openTime);
	},
	
	workoutList: function(params) {
		return uni.$u.get(`/api/workout`,params);
	},
}
export default common